<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>作用域</title>
</head>
<body>

</body>
<script>
    function a() {
        function b() {
            aa = 123;
        }
        var aa = 0;
        console.log(aa);
        b();
        console.log(aa)
    }
    a();
    
</script>
</html>